//
//  NetworkTool.h
//  AffectionBee
//
//  Created by 李通 on 16/8/18.
//  Copyright © 2016年 chivalrous. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "Singleton.h"

/** 成功回调 */
typedef void(^SuccessCompletedBlock)(id responseObject);

/** 失败回调 */
typedef void(^FailureCompletedBlock)(NSError *error);

typedef enum : NSUInteger {
    
    NetworkToolTypeGET,
    NetworkToolTypePOST
    
} NetworkToolType;

@interface NetworkTool : AFHTTPSessionManager

Singleton_h(Manager)

- (void)oauthLoadDataWithNetworkToolType:(NetworkToolType)type UrlString:(NSString *)urlString parameters:(NSDictionary *)parameters SuccessBlock:(SuccessCompletedBlock)success failure:(FailureCompletedBlock)failure;

@end
